Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Time Base Functions / Working With Times


ConvertTimeScale

You can convert a time from one time scale into a time that is relative to another time base by calling the ConvertTimeScale function. You must specify the time to be converted in a time structure.

pascal void ConvertTimeScale (TimeRecord *inout, 
                              TimeScale newScale);
inout
Contains a pointer to a time structure that contains the time value to be converted. The ConvertTimeScale function replaces the contents of this time structure with the time value relative to the specified time scale.
newScale
Specifies the time scale for this operation.
DESCRIPTION
The ConvertTimeScale function does not include the rate associated with the time value in the conversion; therefore, you should use this function when you want to convert time durations, but not when converting time values. Use the ConvertTime function (described in the previous section) to convert time values.

ERROR CODES
None


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996